package com.logic.saas.rest.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.logic.saas.util.JsonUtils;

@Controller
public class TestController{

	@RequestMapping(method = RequestMethod.GET, value = "/address/province/{zipCode}")
	@ResponseBody
	public String getProvinceNameByZipCode(@PathVariable String zipCode) {
		
		RestResponse restResponse = new RestResponse();
		
		System.out.println("####################"+zipCode);
		String returnedStr = zipCode;
		try {
			restResponse.setStatus(0);
			restResponse.setReturnMessage("test测试"+zipCode);
			returnedStr = JsonUtils.toJSON(restResponse);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return returnedStr;
	}

	
}
